<?php 
/**
 * Concept: Single content setup
 * Copyright 2011 www.gradientpixels.ca
 * Theme: Incantation
 */

get_header(); ?>
<div id="content-wrapper" class="clearfix" >
		<div class="w960 padding55">
			<div id="content-main" role="main" class="clearfix">
			<?php while ( have_posts() ) : the_post(); ?>
<div id="single-portfolio-wrap" class="clearfix">
	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<div id="portfolio-left">
			<header class="entry-header">
				<h1 class="entry-title"><?php the_title(); ?></h1>
			</header>
				<?php the_content(); ?>
		</div>
			
<div id="portfolio-right" class="clearfix">
	<div id="gp-pf-image">	
	<?php if (has_post_thumbnail()) : ?>
	<?php
	$thumbheight = of_get_option('portfolio_image_height');
    $thumb = get_post_thumbnail_id(); 
    $postimage = vt_resize($thumb, '', 570, $thumbheight, true );
	?>
		<div class="pf-imagewrap" style="height:<?php //echo of_get_option('portfolio_image_height'); ?>auto;" >
			<div class="pf-overlay"></div>
				<a rel="prettyPhoto" href="<?php $thumbnail_id=get_the_post_thumbnail($post->ID); preg_match ('/src="(.*)" class/',$thumbnail_id,$link); echo $link[1]; ?>" title="<?php the_title(); ?>">
	<img src="<?php echo $postimage[url]; ?>" alt="<?php the_title(); ?>" width="<?php echo $postimage[width]; ?>" height="<?php echo $postimage[height]; ?>" style="border-bottom:6px solid <?php echo of_get_option('portfolio_img_bottom'); ?>;" /></a>	
		</div><!-- .pf-imagewrap -->
	</div><!-- #gp-pf-image -->
	
		
	<?php endif; ?>

</div><!-- #portfolio-right -->
</article>
</div><!-- #single-portfolio-wrap -->

<div id="single-portfolio-nav"> 
	<?php //previous_post_link('%link', 'Previous Item', FALSE); ?> <?php //next_post_link('%link', 'Next Item', FALSE); ?>
	<?php previous_post_link( '%link', __( 'Previous Item', 'gp' ), FALSE ); ?> <?php next_post_link( '%link', __( 'Next Item', 'gp' ), FALSE); ?>
</div>

		
	<?php if ( of_get_option('portfolio_comments') ) { // Shows or hides this group ?>
		<?php comments_template( '', true ); // load the comments template ?>
	<?php } ?>				
				<?php endwhile; // end of the loop. ?>				
			</div><!-- #content-main -->				
		</div><!-- .w960 -->
</div><!-- #content-wrapper -->

<?php get_footer(); ?>